home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Invisible Universe
/
Invisible Universe (1995)(Voyager)[Mac-PC].iso
/
mac
/
MOVIES
/
POETRY.DIR
/
00005_Script_5
< prev
next >
Wrap
Text File
|
1995-11-15
|
6KB
|
204 lines
on showHilite
global gCurrChan,gFirsChan,gLastChan,gPoetryButtons,gPrevHilite
goMovieGo
set m = the movie
testOverheadMenu
if m <> the movie then exit
put getAprop(gPoetryButtons,gCurrChan) into thisOne
if rollOver(gCurrChan) then
put the puppet of sprite gCurrChan into pState
puppetSprite gCurrChan,false
put the castnum of sprite gCurrChan into it
set the puppet of sprite gCurrChan to pState
goMovieGo
if (it<>0) then
if gCurrChan <> gPrevHilite then
rollo(thisOne)
put gCurrChan into gPrevHilite
end if
goMovieGo
if the mouseDown then
press(thisOne)
put 0 into gPrevHilite
goMovieGo
set pressState = 1
if gCurrChan <> 5 and gCurrChan <> 6 then
repeat while the mouseDown
goMovieGo
if not pressState and rollover(gCurrChan) then
press(thisOne)
set pressState = 1
end if
goMovieGo
if pressState and not rollover(gCurrChan) then
norm(thisOne)
set pressState = 0
end if
end repeat
end if
if pressState then
set m = the Movie
doScript(thisOne)
if m = the Movie then norm(thisOne)
end if
end if
else
put gCurrChan+1 into gCurrChan
if gCurrChan > gLastChan then put gFirsChan into gCurrChan
goMovieGo
end if
else
if gCurrChan = gPrevHilite then norm(thisOne)
put 0 into gPrevHilite
put gCurrChan+1 into gCurrChan
if gCurrChan > gLastChan then put gFirsChan into gCurrChan
goMovieGo
end if
goMovieGo
end showHilite
on nextPage
global gPoemIsPlaying,gLastPage
if gLastPage then exit
-- if not(gPoemIsPlaying ) then puppetTransition 02,1,24,true
go to (the frame)+1
setUpPage "next"
updateStage
end nextPage
on prevPage
global gPoemIsPlaying, gPageIndex
if gPageIndex = 1 then exit
-- if not(gPoemIsPlaying ) then puppetTransition 01,1,24,true
go to (the frame)-1
setUpPage "prev"
updateStage
end prevPage
on nextPoem
global gPoemLabel, gPageIndex
-- puppetTransition 50,1,120,false
stopPoem
addToRetrace(gPoemLabel)
if gPoemLabel = "P96" then go frame "P11"
else go to marker(1)
put the frameLabel into gPoemLabel
put 0 into gPageIndex
setUpPage "next"
updateStage
end nextPoem
on prevPoem
global gPoemLabel, gPageIndex
-- puppetTransition 50,1,120,false
stopPoem
addToRetrace(gPoemLabel)
if gPoemLabel = "P11" then go frame "P96"
else go to marker(-1)
put the frameLabel into gPoemLabel
put 0 into gPageIndex
setUpPage "next"
updateStage
end prevPoem
on hearPoem
global gPoemLabel,gPoemIsPlaying, gVolume, gPageTurnTime,gPageIndex
if the type of sprite 10 <> 16 then exit
if (the movieRate of sprite 10) > 0 and (the movieTime of sprite 10) > 0 then
stopPoem
else
puppetSprite 10, true
repeat while true
preloadcast gPoemLabel
if the loaded of cast gPoemLabel then exit repeat
end repeat
set the movieRate of sprite 10 to .0001
set the volume of sprite 10 to gVolume
set the movieTime of sprite 10 to 0
put line gPageIndex of field(the castNum of sprite 9) into it
set the startTime of sprite 10 to integer(it)
set the stopTime of sprite 10 to (the duration of cast gPoemLabel)
set the movieRate of sprite 10 to 1
put true into gPoemIsPlaying
puppetSprite 10, false
updateStage
end if
end hearPoem
on stopPoem
global gPoemLabel, gPoemIsPlaying
if gPoemIsPlaying then
put false into gPoemIsPlaying
if the type of sprite 10 <> 16 then exit
if the movietime of sprite 10 < the stopTime of sprite 10 then
repeat with i = 1 to 8
set the volume of sprite 10 to (the volume of sprite 10)-32
delay 8
end repeat
end if
set the movieRate of sprite 10 to 0
set the startTime of sprite 10 to 0
-- repeat while true
unloadcast gPoemLabel
-- if not(the loaded of cast gPoemLabel) then exit repeat
-- end repeat
end if
end stopPoem
on goMovieGo
global gPoemLabel, gPoemIsPlaying, gPageTurnTime, gLastPage
if not(gPoemIsPlaying) then exit
if the type of sprite 10 <> 16 then exit
put (the movieTime of sprite 10) into it
-- if it < gPageTurnTime then set the movieRate of sprite 10 to 1
if it >= gPageTurnTime then
put ">>> > pageturn time lastpage = " & gLastPage
if gLastPage then stopPoem
else nextPage
end if
updateStage
end goMovieGo
on setUpPage whichWay
global gPoemIsPlaying, gPageTurnTime, gPageIndex, gPoemLabel, gLastPage
if whichWay = "prev" then put gPageIndex-1 into gPageIndex
else put gPageIndex+1 into gPageIndex
put the castNum of sprite 9 into theField
if theField<> 0 then
put the text of field theField into theTimes
put integer(line gPageIndex of theTimes) into pageTime
put integer(line gPageIndex+1 of theTimes) into gPageTurnTime
put (the castNum of sprite 2=0) into gLastPage
put (gPageTurnTime = the duration of cast gPoemLabel) into gLastPage
if ( whichWay = "prev" and (the movieTime of sprite 10) >= pageTime) or¼
(whichWay = "next" and (the movieTime of sprite 10) <= pageTime) then
set the movieTime of sprite 10 to pageTime
end if
else
put (the castNum of sprite 2=0) into gLastPage
end if
end setUpPage